package com.hs.wdss.action.search;
 
import java.io.IOException;
import java.util.List;
import java.util.Map;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.commons.lang.StringUtils;
import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

import com.hs.core.action.BaseAction;
import com.hs.core.db.DBMgr;
import com.hs.core.db.QueryPage;
import com.hs.wdss.model.WdssDisinfo;
import com.hs.wdss.service.IDataService;
@Controller  
public class SearchController  extends BaseAction {
    /**
	 * 
	 */
	private static final long serialVersionUID = -354434172898440670L;
	private static final Logger logger = Logger.getLogger(SearchController.class);
	private IDataService dataService;
    @Autowired  
	public void setDataService(IDataService dataService) {
		this.dataService = dataService;
	}
    /**
	  * 相似度识别主框架
	  * @param request
	  * @param response
	  * @param modelMap
	  * @return
	  * @throws ServletException
	  * @throws IOException
	  */
	 @RequestMapping(value="/search/mainframe.do")   
    public ModelAndView mainframe(HttpServletRequest request,
				HttpServletResponse response,ModelMap modelMap) throws ServletException, IOException {
		
		 return new ModelAndView("app/search/mainframe",modelMap);
		 
	 } 
	 
	 /**
	  * 待比较医案列表
	  * @param request
	  * @param response
	  * @param modelMap
	  * @return
	  * @throws ServletException
	  * @throws IOException
	  */
	 @RequestMapping(value="/search/slist.do")   
    public ModelAndView slist(HttpServletRequest request,
				HttpServletResponse response,ModelMap modelMap) throws ServletException, IOException {
		
		 return new ModelAndView("app/search/sourselist",modelMap);
		 
	 } 
	 /**
	  * 全部被比较医案列表
	  * @param request
	  * @param response
	  * @param modelMap
	  * @return
	  * @throws ServletException
	  * @throws IOException
	  */
	 @RequestMapping(value="/search/glist.do")   
    public ModelAndView glist(HttpServletRequest request,
				HttpServletResponse response,ModelMap modelMap) throws ServletException, IOException {
		
		 return new ModelAndView("app/search/goallist",modelMap);
		 
	 } 
	 /**
	  * 搜索主页
	  * @param request
	  * @param response
	  * @param modelMap
	  * @return
	  * @throws ServletException
	  * @throws IOException
	  */
	 @RequestMapping(value="/search/sindex.do")   
     public ModelAndView sindex(HttpServletRequest request,
				HttpServletResponse response,ModelMap modelMap) throws ServletException, IOException {
		
		 return new ModelAndView("/search/mainframe.do",modelMap);
		 
	 } 
}
